<?php
/**
 * ManiaLive - TrackMania dedicated server manager in PHP
 *
 * @copyright   Copyright (c) 2009-2011 NADEO (http://www.nadeo.com)
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL License 3
 * @version     $Revision: 2236 $:
 * @author      $Author: florian $:
 * @date        $Date: 2011-02-09 10:37:18 +0100 (mer., 09 févr. 2011) $:
 */

namespace ManiaLivePlugins\MLEPP\ServerInfo\Gui\Controls;

use ManiaLib\Gui\Elements\Label;
use ManiaLib\Gui\Elements\Bgs1;

class ListItem extends \ManiaLive\Gui\Windowing\Control
{
	public $background;
	public $label;

	function initializeComponents()
	{
		$this->sizeY = $this->getParam(0, 4);

		$this->background = new Bgs1();
		$this->background->setSubStyle("BgCardList");
		$this->background->setSizeY(5);
		$this->addComponent($this->background);

		$this->label = new Label();
		$this->label->setTextColor('fff');
		$this->label->setPosition(2, 1);
		$this->label->setSizeY(3);
		$this->label->setTextSize(2);
		$this->addComponent($this->label);
	}

	function onResize()
	{
		$this->background->setSizeX($this->sizeX);
		$this->label->setSizeX($this->sizeX - 2);
	}
}

?>